import { ref, type Ref } from 'vue'
import { defineStore } from 'pinia'
import type { ChatSession } from '@/common/models/session'

export const useSessionStore = defineStore('session', () => {
  const session: Ref<ChatSession | null> = ref(null);

  function setSession(payload: ChatSession) {
    session.value = payload
  }

  return { session, setSession }
})
